package com.ruoyi.ihome.domain;

import com.baomidou.mybatisplus.annotation.TableLogic;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.util.Arrays;
import java.util.Date;
import java.util.List;

/**
 * 公寓管理对象 ih_apartment
 *
 * @author zy
 * @date 2024-08-13
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Apartment extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 公寓id
     */
    private Long id;

    /**
     * 公寓名
     */
    @Excel(name = "公寓名")
    private String apartmentName;

    /**
     * 图片
     */
    @Excel(name = "图片")
    private String img;

    /**
     * 公寓价格区间(小值）
     */
    @Excel(name = "公寓价格区间(小值）")
    private BigDecimal priceMin;

    /**
     * 公寓价格区间(大值)
     */
    @Excel(name = "公寓价格区间(大值)")
    private BigDecimal priceMax;

    /**
     * 所处街道
     */
    @Excel(name = "所处街道")
    private String street;

    /**
     * 公寓信息
     */
    @Excel(name = "公寓信息")
    private String apartmentInfo;

    /**
     * 经度
     */
    @Excel(name = "经度")
    private BigDecimal longitude;

    /**
     * 纬度
     */
    @Excel(name = "纬度")
    private BigDecimal latitude;
    /** 朝向（0，1，2，3） */
    @Excel(name = "朝向")
    private String orientation;

    /** 户型 */
    @Excel(name = "户型")
    private String houseType;

    /** 面积 */
    @Excel(name = "面积")
    private String area;


    /**
     * 在租数量
     */
    @Excel(name = "在租数量")
    private Long houseNum;

    /**
     * 出租类型数量
     */
    @Excel(name = "出租类型数量")
    private Long typeNum;

    /**
     * 0:上架;1:下架
     */
    @Excel(name = "0:上架;1:下架")
    private Long sellStatus;
    @Excel(name = "创建时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date createTime;

    /**
     * 0:未删除;1:已删除;
     */
    @Excel(name = "0:未删除;1:已删除;")
    @TableLogic
    private Long del;


    private long[] facilityIds;
    //    关联属性
    private List<ApartmentAndFacility> apartmentAndFacilitys;

    private List<ApartmentFacility> apartmentFacility;

}
